<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>测试</title>

    <!--第一种-->
    <!--<script>-->
        <!--function hello() {-->
            <!--document.getElementById("message").innerHTML="hello world , javascript!"-->
        <!--}-->
    <!--</script>-->
    <!--第二种-->
    <script src="myScript.js"></script>
</head>
<body>
    <div id="message"></div>
    <button type="button" onclick="hello();">click it</button>

</body>
</html>